package cn.silver.module.message.domain;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.util.Date;

/**
 * @author zhouxiaobo
 */
@Data
@NoArgsConstructor
@Table(name = "msg_notice_user")
@EqualsAndHashCode(callSuper = true)
@Schema(name = "MsgNoticeUser", title = "消息管理-站内消息-用户消息对象")
public class MsgNoticeUser extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 通知主键
     */
    @Schema(title = "通知主键")
    private String noticeId;
    /**
     * 接收人
     */
    @Schema(title = "接收人")
    private String userId;
    /**
     * 是否已读
     */
    @Schema(title = "是否已读")
    private Boolean readFlg;
    /**
     * 已读时间
     */
    @Schema(title = "已读时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date readTime;
}
